package com.cspg.ssss.vo.convert;

import com.cspg.ssss.domain.UserDetailInfoEntity;
import com.cspg.ssss.vo.UserInfoVo;

import java.util.ArrayList;
import java.util.List;

public class UserInfoVoConvert {

    public static UserInfoVo Convert(UserDetailInfoEntity en){
        UserInfoVo vo = new UserInfoVo();
        vo.setUser_id(en.getUser_id());
        vo.setUser_name(en.getUser_name());
        vo.setMobile(en.getMobile());
        vo.setEmail(en.getEmail());
        vo.setDepartment_name(en.getDepartment_name());
        vo.setDepartment_path(en.getDepartment_path());
        vo.setDepartment_displaypath(en.getDepartment_displaypath());

        return vo;
    }

    public static List<UserInfoVo> ConvertList(List<UserDetailInfoEntity> enList){
        List<UserInfoVo> retList = new ArrayList<UserInfoVo>();
        for(UserDetailInfoEntity en : enList){
            UserInfoVo vo = new UserInfoVo();
            vo = Convert(en);
            retList.add(vo);
        }

        return retList;
    }
}
